/**
 * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.triumphsys.icici.cmeeting.portlet.model;

import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.util.StringBundler;
import com.liferay.portal.model.impl.BaseModelImpl;
import com.liferay.portal.util.PortalUtil;

import java.io.Serializable;

import java.lang.reflect.Proxy;

import java.util.Date;

/**
 * @author Triumphsys
 */
public class CMMeetingClp extends BaseModelImpl<CMMeeting> implements CMMeeting {
	public CMMeetingClp() {
	}

	public long getPrimaryKey() {
		return _meetingId;
	}

	public void setPrimaryKey(long pk) {
		setMeetingId(pk);
	}

	public Serializable getPrimaryKeyObj() {
		return new Long(_meetingId);
	}

	public long getMeetingId() {
		return _meetingId;
	}

	public void setMeetingId(long meetingId) {
		_meetingId = meetingId;
	}

	public long getCalEventId() {
		return _calEventId;
	}

	public void setCalEventId(long calEventId) {
		_calEventId = calEventId;
	}

	public long getGroupId() {
		return _groupId;
	}

	public void setGroupId(long groupId) {
		_groupId = groupId;
	}

	public long getCompanyId() {
		return _companyId;
	}

	public void setCompanyId(long companyId) {
		_companyId = companyId;
	}

	public long getUserId() {
		return _userId;
	}

	public void setUserId(long userId) {
		_userId = userId;
	}

	public String getUserUuid() throws SystemException {
		return PortalUtil.getUserValue(getUserId(), "uuid", _userUuid);
	}

	public void setUserUuid(String userUuid) {
		_userUuid = userUuid;
	}

	public long getModifiedBy() {
		return _modifiedBy;
	}

	public void setModifiedBy(long modifiedBy) {
		_modifiedBy = modifiedBy;
	}

	public Date getCreateDate() {
		return _createDate;
	}

	public void setCreateDate(Date createDate) {
		_createDate = createDate;
	}

	public Date getModifiedDate() {
		return _modifiedDate;
	}

	public void setModifiedDate(Date modifiedDate) {
		_modifiedDate = modifiedDate;
	}

	public long getProposalFolderId() {
		return _proposalFolderId;
	}

	public void setProposalFolderId(long proposalFolderId) {
		_proposalFolderId = proposalFolderId;
	}

	public Date getMomsFolderId() {
		return _momsFolderId;
	}

	public void setMomsFolderId(Date momsFolderId) {
		_momsFolderId = momsFolderId;
	}

	public long getExtractsFolderId() {
		return _extractsFolderId;
	}

	public void setExtractsFolderId(long extractsFolderId) {
		_extractsFolderId = extractsFolderId;
	}

	public String getVenue() {
		return _venue;
	}

	public void setVenue(String venue) {
		_venue = venue;
	}

	public long getEntityId() {
		return _entityId;
	}

	public void setEntityId(long entityId) {
		_entityId = entityId;
	}

	public Date getFirstLockDate() {
		return _firstLockDate;
	}

	public void setFirstLockDate(Date firstLockDate) {
		_firstLockDate = firstLockDate;
	}

	public Date getSecondLockDate() {
		return _secondLockDate;
	}

	public void setSecondLockDate(Date secondLockDate) {
		_secondLockDate = secondLockDate;
	}

	public Date getThiirdLockDate() {
		return _thiirdLockDate;
	}

	public void setThiirdLockDate(Date thiirdLockDate) {
		_thiirdLockDate = thiirdLockDate;
	}

	public Date getMomLockDate() {
		return _momLockDate;
	}

	public void setMomLockDate(Date momLockDate) {
		_momLockDate = momLockDate;
	}

	public CMMeeting toEscapedModel() {
		if (isEscapedModel()) {
			return this;
		}
		else {
			return (CMMeeting)Proxy.newProxyInstance(CMMeeting.class.getClassLoader(),
				new Class[] { CMMeeting.class }, new AutoEscapeBeanHandler(this));
		}
	}

	public Object clone() {
		CMMeetingClp clone = new CMMeetingClp();

		clone.setMeetingId(getMeetingId());
		clone.setCalEventId(getCalEventId());
		clone.setGroupId(getGroupId());
		clone.setCompanyId(getCompanyId());
		clone.setUserId(getUserId());
		clone.setModifiedBy(getModifiedBy());
		clone.setCreateDate(getCreateDate());
		clone.setModifiedDate(getModifiedDate());
		clone.setProposalFolderId(getProposalFolderId());
		clone.setMomsFolderId(getMomsFolderId());
		clone.setExtractsFolderId(getExtractsFolderId());
		clone.setVenue(getVenue());
		clone.setEntityId(getEntityId());
		clone.setFirstLockDate(getFirstLockDate());
		clone.setSecondLockDate(getSecondLockDate());
		clone.setThiirdLockDate(getThiirdLockDate());
		clone.setMomLockDate(getMomLockDate());

		return clone;
	}

	public int compareTo(CMMeeting cmMeeting) {
		int value = 0;

		if (getMeetingId() < cmMeeting.getMeetingId()) {
			value = -1;
		}
		else if (getMeetingId() > cmMeeting.getMeetingId()) {
			value = 1;
		}
		else {
			value = 0;
		}

		if (value != 0) {
			return value;
		}

		return 0;
	}

	public boolean equals(Object obj) {
		if (obj == null) {
			return false;
		}

		CMMeetingClp cmMeeting = null;

		try {
			cmMeeting = (CMMeetingClp)obj;
		}
		catch (ClassCastException cce) {
			return false;
		}

		long pk = cmMeeting.getPrimaryKey();

		if (getPrimaryKey() == pk) {
			return true;
		}
		else {
			return false;
		}
	}

	public int hashCode() {
		return (int)getPrimaryKey();
	}

	public String toString() {
		StringBundler sb = new StringBundler(35);

		sb.append("{meetingId=");
		sb.append(getMeetingId());
		sb.append(", calEventId=");
		sb.append(getCalEventId());
		sb.append(", groupId=");
		sb.append(getGroupId());
		sb.append(", companyId=");
		sb.append(getCompanyId());
		sb.append(", userId=");
		sb.append(getUserId());
		sb.append(", modifiedBy=");
		sb.append(getModifiedBy());
		sb.append(", createDate=");
		sb.append(getCreateDate());
		sb.append(", modifiedDate=");
		sb.append(getModifiedDate());
		sb.append(", proposalFolderId=");
		sb.append(getProposalFolderId());
		sb.append(", momsFolderId=");
		sb.append(getMomsFolderId());
		sb.append(", extractsFolderId=");
		sb.append(getExtractsFolderId());
		sb.append(", venue=");
		sb.append(getVenue());
		sb.append(", entityId=");
		sb.append(getEntityId());
		sb.append(", firstLockDate=");
		sb.append(getFirstLockDate());
		sb.append(", secondLockDate=");
		sb.append(getSecondLockDate());
		sb.append(", thiirdLockDate=");
		sb.append(getThiirdLockDate());
		sb.append(", momLockDate=");
		sb.append(getMomLockDate());
		sb.append("}");

		return sb.toString();
	}

	public String toXmlString() {
		StringBundler sb = new StringBundler(55);

		sb.append("<model><model-name>");
		sb.append("com.triumphsys.icici.cmeeting.portlet.model.CMMeeting");
		sb.append("</model-name>");

		sb.append(
			"<column><column-name>meetingId</column-name><column-value><![CDATA[");
		sb.append(getMeetingId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>calEventId</column-name><column-value><![CDATA[");
		sb.append(getCalEventId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>groupId</column-name><column-value><![CDATA[");
		sb.append(getGroupId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>companyId</column-name><column-value><![CDATA[");
		sb.append(getCompanyId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>userId</column-name><column-value><![CDATA[");
		sb.append(getUserId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>modifiedBy</column-name><column-value><![CDATA[");
		sb.append(getModifiedBy());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>createDate</column-name><column-value><![CDATA[");
		sb.append(getCreateDate());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>modifiedDate</column-name><column-value><![CDATA[");
		sb.append(getModifiedDate());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>proposalFolderId</column-name><column-value><![CDATA[");
		sb.append(getProposalFolderId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>momsFolderId</column-name><column-value><![CDATA[");
		sb.append(getMomsFolderId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>extractsFolderId</column-name><column-value><![CDATA[");
		sb.append(getExtractsFolderId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>venue</column-name><column-value><![CDATA[");
		sb.append(getVenue());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>entityId</column-name><column-value><![CDATA[");
		sb.append(getEntityId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>firstLockDate</column-name><column-value><![CDATA[");
		sb.append(getFirstLockDate());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>secondLockDate</column-name><column-value><![CDATA[");
		sb.append(getSecondLockDate());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>thiirdLockDate</column-name><column-value><![CDATA[");
		sb.append(getThiirdLockDate());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>momLockDate</column-name><column-value><![CDATA[");
		sb.append(getMomLockDate());
		sb.append("]]></column-value></column>");

		sb.append("</model>");

		return sb.toString();
	}

	private long _meetingId;
	private long _calEventId;
	private long _groupId;
	private long _companyId;
	private long _userId;
	private String _userUuid;
	private long _modifiedBy;
	private Date _createDate;
	private Date _modifiedDate;
	private long _proposalFolderId;
	private Date _momsFolderId;
	private long _extractsFolderId;
	private String _venue;
	private long _entityId;
	private Date _firstLockDate;
	private Date _secondLockDate;
	private Date _thiirdLockDate;
	private Date _momLockDate;
}